<!--{include(pe_tpl('header.html'));}-->
<div class="huiyuan_content">
	<!--{include(pe_tpl('user_menu.html'));}-->
	<div class="fr huiyuan_main">
		<!--<div class="hy_tt">
			<a href="{$pe['host']}user.php?mod=order">个人中心</a>
		</div>-->
		<div class="u_index_box mat5">
			<div class="u_index_rtt">
				<div class="user_tx"><a href="user.php?mod=setting&act=logo"><img src="{$info['user_logo']}" /></a></div>
				<div class="fl mal20 mat10">
					您好：<span class="cred">{$info['user_name']}</span><span class="mal20 dj_btn">{$info['userlevel_name']}</span>
					<div>上次登录：{pe_date($_s_user_ltime)}</div>
				</div>
				<div class="clear"></div>
			</div>
			<div class="u_index_l">
				<div class="u_info">
					<div style="margin-left:0px;">
						<p>手机号码：
							<!--{if($user['user_phone']):}-->
							<span class="c999">{$user['user_phone']}</span>
							<!--{else:}-->
							<a href="user.php?mod=setting&act=base" class="cblue">完善</a>
							<!--{endif;}-->					
						</p>
						<p>电子邮箱：
							<!--{if($user['user_email']):}-->
							<span class="c999">{$user['user_email']}</span>
							<!--{else:}-->
							<a href="user.php?mod=setting&act=base" class="cblue">完善</a>
							<!--{endif;}-->
						</p>
					</div>
				</div>
			</div>
			<div class="u_index_m">
				<div>待付款：<span class="c999"><a href="user.php?mod=order&state=wpay">{$info['wpay_num']}</a> 个</span></div>
				<div>待发货：<span class="c999"><a href="user.php?mod=order&state=wsend">{$info['wsend_num']}</a> 个</span></div>
			</div>
			<div class="u_index_r">
				<div class="u_ye_l">
					<div>账户余额：<a href="user.php?mod=moneylog" class="corg">{$user['user_money']} 元</a></div>
					<div>积分余额：<a href="user.php?mod=pointlog" class="c999">{$user['user_point']} 个</a></div>
				</div>
				<div class="u_ye_r">
					<a href="user.php?mod=pay">充值</a>
					<a href="user.php?mod=cashout&act=add" class="btntx">提现</a>
				</div>
				<div class="clear"></div>
			</div>
			<div class="clear"></div>
		</div>
		<div class="u_jilu_tt">
			<a href="javascript:;" class="fl">最新订单</a>
			<div class="clear"></div>
		</div>
		<!--{foreach($list as $v):}-->
		<div class="hy_ordertt">
			<span class="fl">{$v['order_atime']}</span>
			<span class="fl" style="margin-left:30px">订单号：{$v['order_id']}</span>
			<!--{if($v['pintuan_id'] && $v['order_pstate']):}-->
			<span class="fr mar10">拼团编号：<a href="{$pe['host']}index.php?mod=order&act=pintuan&id={$v['pintuan_id']}" target="_blank">{$v['pintuan_id']}</a></span>
			<!--{endif;}-->
			<div class="clear"></div>
		</div>
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="hy_orderlist">
		<tr>
			<td style="text-align:left;">
				<!--{foreach($v['product_list'] as $kk=>$vv):}-->
				<div class="dingdan_list" <!--{if($kk==0):}-->style="padding-top:0;border-top:0"<!--{endif;}-->>
					<a href="{pe_url('product/'.$vv['product_id'])}" class="fl mar10 dingdan_img" target="_blank"><img src="{$vv['product_logo']}" /></a>
					<div class="fl dingdan_name">
						<!--{if($v['order_type']=='pintuan'):}--><span class="tag_pintuan">拼团</span><!--{endif;}-->
						<a href="{pe_url('product-'.$vv['product_id'])}" target="_blank" class="dd_name">{$vv['product_name']}</a>
						<p class="c888 mat5">{$vv['product_rule']}</p>
					</div>
					<div class="fl dingdan_jg">¥{$vv['product_money']} <span class="mat5 c888 font12">×{$vv['product_num']}</span></div>
					<div class="fr dingdan_tk">
						<!--{if($vv['refund_id']):}-->
						<a href="user.php?mod=refund&act=view&id={$vv['refund_id']}" target="_blank">{$vv['refund_stateshow']}</a>
						<!--{elseif(in_array($v['order_state'], array('wsend', 'wget'))):}-->
						<a href="user.php?mod=refund&act=add&id={$vv['orderdata_id']}" onclick="return pe_dialog(this, '申请退款/退货', 600, 400)">退款/退货</a>			
						<!--{endif;}-->
					</div>
					<div class="clear"></div>
				</div>
				<!--{endforeach;}-->
			</td>
			<td width="120">
				<p class="corg font14 strong">{$v['order_money']}</p>
				<p class="c999">（含运费：{$v['order_wl_money']}）</p>
				<p class="c999">{$v['order_payment_name']}</p>
			</td>
			<td width="100">
				{order_stateshow($v['order_state'], 'html')}
				<p><a href="user.php?mod=order&act=view&id={$v['order_id']}" target="_blank">订单详情</a></p>
			</td>
			<td width="100">
				<!--{if($v['order_state'] == 'wpay'):}-->
				<a class="tag_org" href="javascript:pay_btn('{$v['order_id']}')">立即付款</a>
				<p class="mat5"><a class="c999" href="user.php?mod=order&act=close&id={$v['order_id']}" onclick="return pe_dialog(this, '取消订单', 550, 400)">取消订单</a></p>
				<!--{elseif($v['order_state'] == 'wget' && $v['order_payment'] != 'cod'):}-->
				<a class="tag_green" href="javascript:pe_confirm('已收到商品', 'user.php?mod=order&act=success&id={$v['order_id']}&token={$pe_token}');">确认收货</a>
				<!--{elseif($v['order_state'] == 'success' && !$v['order_comment']):}-->
				<a class="tag_gray" href="user.php?mod=order&act=comment&id={$v['order_id']}" onclick="return pe_dialog(this, '发表评价', 800, 500)">发表评价</a>
				<!--{endif;}-->
				<!--{if($v['order_wl_id']!=''):}-->
				<a class="tag_gray mat5" href="user.php?mod=order&act=kuaidi&id={$v['order_id']}" onclick="return pe_dialog(this, '查看物流', 800, 600)">查看物流</a>
				<!--{endif;}-->
			</td>
		</tr>
		</table>
		<!--{endforeach;}-->
	</div>
	<div class="clear"></div>
</div>
<script type="text/javascript">
function pay_btn(id) {
	pe_get("{$pe['host']}user.php?mod=order&act=pay&id="+id, function(json){
		if (json.code == 1) {
			pe_open("{$pe['host']}index.php?mod=pay&id="+json.data.id);
		}
		else {
			pe_tip(json.msg);
		}
	})
}
</script>
<!--{include(pe_tpl('footer.html'));}-->